<?php

namespace app\admin\model;

use think\Model;

class Admin extends Model
{
    public function Login($username, $pwd)
    {
        if ($username !== '18205525652' || $pwd !== '123456') {
            return Result(0, '账号或密码不正确');
        }

        $token = (new \RSA\RSA())->Encode('Administrator');
        return Result(1, '登陆成功', [
            'user_token' => $token
        ]);
    }
}
